package com.heima.user.controller;

import com.heima.model.common.dtos.AuthDto;
import com.heima.model.common.dtos.ResponseResult;

import com.heima.user.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户审核控制层
 */
@RestController
@RequestMapping("/api/v1/auth")
public class UserProcessController {
    @Autowired
    private AuthService authService;
    /**
     * 审核列表显示
     * @param authDto
     * @return
     */
    @PostMapping("/list")
    public ResponseResult pageQuery(@RequestBody AuthDto authDto){
        return authService.pageQuery(authDto);
    }
    /**
     * 审核驳回
     * @param authDto
     * @return
     */
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody AuthDto authDto){
        return authService.authFail(authDto);
    }
    /**
     * 审核通过
     * @param authDto
     * @return
     */
    @PostMapping("/authPass")
    public ResponseResult  authPass(@RequestBody AuthDto authDto){
        return authService.authPass(authDto);
    }


}
